<%-- 
    Document   : rVerModificarDispositivo
    Created on : 8/09/2013, 11:14:57 AM
    Author     : Andres
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<%@taglib uri="/struts-tags" prefix="s"%>
<h3>Dispositivo</h3>
<table border="0" width="60%" cellpadding="0" cellspacing="0" id="product-table" name="tablaDisp">
        <tr>
                <th class="table-header-repeat line-left minwidth-1"><a>ID</a></th>
                <th class="table-header-repeat line-left minwidth-1"><a>Marca</a></th>
                <th class="table-header-repeat line-left minwidth-1"><a>Modelo</a></th>
                <th class="table-header-repeat line-left minwidth-1"><a>Tipo</a></th>
                <th class="table-header-repeat line-left minwidth-1"><a>No.Serie</a></th>
                <th class="table-header-repeat line-left minwidth-1"><a>Departamento</a></th>
                <th class="table-header-repeat line-left minwidth-1"><a>Localización</a></th>
        </tr> 
        <tr>
            <td><input type="text"  class="inp-form" value="<s:property value='dd.idDisp'/>" id="idDisp" readonly=""/></td>
            <td><s:property value="dd.marca"/></td>
            <td><s:property value="dd.modelo"/></td>
            <td><s:property value="dd.tipo"/></td>
            <td><s:property value="dd.noserie"/></td>
            <td><s:property value="dd.departamento"/></td>
            <td><s:property value="dd.localizacion"/></td>
        </tr> 
        <tr>
            <td colspan="7"><input type="button" class="btn" value="Regresar" id="btnRegresar"></td>
        </tr>    
 </table>
<h3>Datos</h3>
<form id="modificarDispositivo">
<table border="0" cellpadding="0" cellspacing="0"  id="id-form">
        <tr>
            <th valign="top">
                   No. Serie:
            </th> 
            <td>
                <input type="text" class="inp-form" value="<s:property value='dd.noserie'/>" name="noserie" id="noserie"/>
            </td>    
            <td>
            <div class="error-left"></div>
            <div class="error-inner" id="enoserie">Este campo es requerido.</div>
            </td>
        </tr>
        <tr>
            <th valign="top">
                Departamento: 
            </th> 
            <td>
                <select id="departamento" name="departamento">
                    <option value="">[Departamento]</option>
                    <s:iterator value="listaDepartamentos" var="depa" status="estatus">
                        <option value="<s:property value='IdDepartamento'/>" <s:if test="#depa.idDepartamento.equals(dd.idDepartamento)"> selected</s:if>><s:property value="Nombre"/></option>   
                    </s:iterator>
                </select>
            </td>    
            <td>
            <div class="error-left"></div>
            <div class="error-inner" id="edepartamento">Este campo es requerido.</div>
            </td>
        </tr>
        <tr>
            <th valign="top">
                Localización: 
            </th> 
            <td>
                <input type="text" class="inp-form" value="<s:property value='dd.localizacion'/>" name="localizacion" id="localizacion"/>
            </td>    
            <td>
            <div class="error-left"></div>
            <div class="error-inner" id="elocalizacion">Este campo es requerido.</div>
            </td>
        </tr>
        <tr>
            <th valign="top">
                Estado: 
            </th> 
            <td>
                <input type="text" class="inp-form" value="<s:property value='dd.estado'/>" name="estado" id="estado"/>
            </td>    
            <td>
            <div class="error-left"></div>
            <div class="error-inner" id="eestado">Este campo es requerido.</div>
            </td>
        </tr>
        <tr>
            <td colspan="2">
                <input type="submit" class="btn" value="Aceptar" name="btnModificarDispositivo" id="btnModificarDispositivo"/>  
            </td>    
        </tr> 
</table>
</form>            
<h3>Componentes</h3>
<table border="0" cellpadding="0" cellspacing="0"  id="id-form">
     <tr>
            <th valign="top">
                Nombre: 
            </th> 
            <td>
                <select id="nombreCompC" name="nombreCompC">
                        <option value="">[Tipo]</option>
                        <s:iterator value="listaTiposComponentes" status="estatus">
                            <option value="<s:property value='IdTipo'/>"><s:property value="Tipo"/></option>   
                        </s:iterator>
                </select> 
            </td>    
            <td>
            <div class="error-left"></div>
            <div class="error-inner" id="enombreCompC">Este campo es requerido.</div>
            </td>
        </tr>
        <tr>
            <th valign="top">
                Caracteristicas: 
            </th> 
            <td>
                <input type="text" class="inp-form" name="caracteristicasCompC" id="caracteristicasCompC"/>
            </td>    
            <td>
            <div class="error-left"></div>
            <div class="error-inner" id="ecaracteristicasCompC">Este campo es requerido.</div>
            </td>
        </tr>
        <tr>
            <td colspan=2"">
                <input type="submit" class="btn" value="Agregar Componente" name="btnAgregarComponenteC" id="btnAgregarComponenteC"/>
            </td>
        </tr>
        <tr>
            <th valign="top">
                Existente: 
            </th> 
            <td>
                <select id="existenteCompC" name="existenteCompC">
                        <option value="">[Tipo]</option>
                        <s:iterator value="listaExistenteComponentes" status="estatus">
                            <option value="<s:property value='Id'/>"><s:property value="IdDispOrigen.IdDisp"/>-<s:property value="IdTipo.Tipo"/></option>   
                        </s:iterator>
                </select> 
            </td>    
            <td>
            <div class="error-left"></div>
            <div class="error-inner" id="eexistenteCompC">Este campo es requerido.</div>
            </td>
        </tr>
        <tr>
            <td colspan="2">
                <input type="button" class="btn" value="Agregar Existente" name="btnAgregarExistenteC" id="btnAgregarExistenteC">
            </td>    
        </tr>     
</table>
<table border="0" width="60%" cellpadding="0" cellspacing="0" id="product-table" name="tablaComp">
        <tr>
                <th class="table-header-repeat line-left minwidth-1"><a>Tipo</a></th>
                <th class="table-header-repeat line-left minwidth-1"><a>Caracteristicas</a></th>
                <th class="table-header-repeat line-left minwidth-1"><a>Eliminar</a></th>
        </tr>
    <s:iterator value="listaComponentes" status="estatus">    
        <tr id="<s:property value='Id'/>">
            <td><s:property value="IdTipo.Tipo"/></td>
            <td><s:property value="Caracteristicas"/></td>
            <td><input type="button" id="btnEliminarComponente" value="Eliminar" class="btn"/></td>
        </tr>
    </s:iterator>   
 </table>
<h3>Encargado</h3>
<table border="0" cellpadding="0" cellspacing="0"  id="id-form">
        <tr>
            <th valign="top">
                   Empleado: 
            </th> 
            <td>
                <select id="encargado" name="encargado">
                    <option value="">[Empleado]</option>
                    <s:iterator value="listaEmpleados" status="estatus">
                        <option value="<s:property value='IdEmpleado'/>"><s:property value="nombre"/> - <s:property value="puesto"/></option>   
                    </s:iterator>
                </select>
            </td>    
            <td>
            <div class="error-left"></div>
            <div class="error-inner" id="eencargado">Este campo es requerido.</div>
            </td>
        </tr>
        <tr>
            <td colspan="2">
                <input type="submit" class="btn" value="Agregar Encargado" name="btnAgregarEncargado" id="btnAgregarEncargado"/>
            </td>    
        </tr> 
 </table>
<table border="0" width="60%" cellpadding="0" cellspacing="0" id="product-table" name="tablaEmp">
        <tr>
                <th class="table-header-repeat line-left minwidth-1"><a>ID</a></th>
                <th class="table-header-repeat line-left minwidth-1"><a>Nombre</a></th>
                <th class="table-header-repeat line-left minwidth-1"><a>Puesto</a></th>
                <th class="table-header-repeat line-left minwidth-1"><a>Departamento</a></th>
                <th class="table-header-repeat line-left minwidth-1"><a>Eliminar</a></th>
        </tr>
        <s:iterator value="listaEncargados" status="estatus">
        <tr id="<s:property value="IdEmpleado"/>">
            <td><s:property value="IdEmpleado"/></td>
            <td><s:property value="Nombre"/></td>
            <td><s:property value="Puesto"/></td>
            <td><s:property value="Departamento.nombre"/></td>   
            <td><input type="button" id="btnEliminarEncargado" value="Eliminar" class="btn"/></td>
        </tr>    
        </s:iterator>
</table>
<h3>Software</h3>
 <table border="0" cellpadding="0" cellspacing="0"  id="id-form">
        <tr>
            <th valign="top">
                   Software: 
            </th> 
            <td>
                <select id="software" name="software">
                    <option value="">[Software]</option>
                    <s:iterator value="listaSoft" status="estatus">
                        <option value="<s:property value='IdSoft'/>"><s:property value="Soft"/></option>   
                    </s:iterator>
                </select>
            </td>    
            <td>
            <div class="error-left"></div>
            <div class="error-inner" id="esoftware">Este campo es requerido.</div>
            </td>
        </tr>
        <tr>
            <td colspan="2">
                <input type="submit" class="btn" value="Agregar Software" name="btnAgregarSoftware" id="btnAgregarSoftware"/>
            </td>    
        </tr> 
 </table> 
<table border="0" width="60%" cellpadding="0" cellspacing="0" id="product-table" name="tablaSoft">
        <tr>
                <th class="table-header-repeat line-left minwidth-1"><a>Software</a></th>
                <th class="table-header-repeat line-left minwidth-1"><a>Descripcion</a></th>
                <th class="table-header-repeat line-left minwidth-1"><a>Eliminar</a></th>
        </tr>
        <s:iterator value="listaSoftAdded" status="estatus">
        <tr id="<s:property value="idSoft"/>">
            <td><s:property value="Soft"/></td>
            <td><s:property value="Descripcion"/></td> 
            <td><input type="button" id="btnEliminarSoftware" value="Eliminar" class="btn"/></td>
        </tr>    
        </s:iterator>
</table>